import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import './assets/styles/theme.css'
import App from './App.vue'
import router from './router'

console.log('开始创建Vue应用 at:', new Date().toISOString())

const app = createApp(App)

app.use(ElementPlus)
// 注册所有Element Plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router)

console.log('应用和路由已准备就绪，准备挂载 at:', new Date().toISOString())
app.mount('#app')
console.log('应用已挂载 at:', new Date().toISOString())